package org.benjamin.lending.configuration;

import javax.servlet.ServletContext;
import javax.servlet.ServletException;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class LendingDispathcerInitializerConfigration extends AbstractAnnotationConfigDispatcherServletInitializer{
	
	private Logger logger = LogManager.getLogger();

	@Override
	protected Class<?>[] getRootConfigClasses() {
		return new Class[] {ApplicationContextConfiguration.class,WebSecurityBeanConfiguration.class,SecurityConfiguration.class};
	}

	@Override
	protected Class<?>[] getServletConfigClasses() {
		return new Class[] {ApplicationServletConfiguration.class};
	}

	@Override
	protected String[] getServletMappings() {
		return new String[] {"/"};
	}

	@Override
	public void onStartup(ServletContext servletContext) throws ServletException {
		logger.info("加载Spring Framework配置信息");
		super.onStartup(servletContext);
	}
	
	

}
